﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Utils;

public partial class ajax_system : FBasePage
{
    // Methods
    protected override void OnLoad(EventArgs e)
    {
        string str = base.Request["action"];
        if ("locale" == str)
        {
            string cookieValue = CookieHelper.GetCookieValue("totw");
            if ((cookieValue == string.Empty) || (cookieValue == "zh_tw"))
            {
                CookieHelper.SetCookie("totw", "zh_cn");
            }
            else
            {
                CookieHelper.SetCookie("totw", "zh_tw");
            }
            string url = "~/index.aspx";
            if (base.Request.UrlReferrer != null)
            {
                url = base.Request.UrlReferrer.AbsoluteUri;
            }
            base.Response.Redirect(url);
            base.Response.End();
        }
    }

}